/*
 * @Descripttion: 入口组件
 * @version:
 * @Author: lhl
 * @Date: 2024-11-16 11:39:56
 * @LastEditors: lhl
 * @LastEditTime: 2024-11-18 23:28:20
 */

// api路由
// import { RouterProvider } from "react-router-dom";
// import router from "./router";
import Router from './router';
// 组件路由 这里定义hashRouter模式 BrowserRouter模式
import { BrowserRouter } from 'react-router-dom';
import { ConfigProvider, App as AntdApp, theme } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import { Provider } from 'react-redux';
import { store } from './store';
import './App.css';

function App() {
  return (
    <>
      {/* api路由 */}
      {/* <RouterProvider router={router} /> */}
      {/* 组件路由 */}
      <ConfigProvider
        locale={zhCN}
        theme={{
          token: {
            // Seed Token，影响范围大
            colorPrimary: '#00b96b',
          },
          // algorithm: theme.darkAlgorithm, // 暗黑算法
          algorithm: theme.defaultAlgorithm, // 默认算法
          // algorithm: theme.compactAlgorithm, // 紧凑算法
        }}
      >
        <AntdApp>
          <Provider store={store}>
            <BrowserRouter>
              <Router />
            </BrowserRouter>
          </Provider>
        </AntdApp>
      </ConfigProvider>
    </>
  );
}

export default App;
